<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Session Storage Demo</title>
</head>
<body>
    <h1>Session Storage Example</h1>
    <input type="text" id="dataInput" placeholder="Enter some data">
    <button onclick="saveData()">Save to SessionStorage</button>
    <button o5nclick="loadData()">Load from SessionStorage</button>
    <button onclick="clearData()">Clear SessionStorage</button>
    <p id="output"></p>

    <script>
        function saveData() {
            const value = document.getElementById('dataInput').value;
            sessionStorage.setItem('myData', value);
            document.getElementById('output').textContent = 'Data saved!';
        }

        function loadData() {
            const value = sessionStorage.getItem('myData');
            document.getElementById('output').textContent = value ? `Loaded: ${value}` : 'No data found.';
        }

        function clearData() {
            sessionStorage.removeItem('myData');
            document.getElementById('output').textContent = 'Data cleared.';
        }
    </script>
</body>
</html>